package com.ruoyi.system.controller;


import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.domain.DataCase;
import com.ruoyi.system.service.IDataCaseService;
import org.aspectj.weaver.loadtime.Aj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/customerCase")
public class CustomerCaseController {

    @Autowired
    private IDataCaseService iDataCaseService;

    @GetMapping(value = "/getInfo")
    public AjaxResult getInfo()
    {
        List<DataCase> dataCases = new ArrayList<>();
        dataCases = iDataCaseService.selectAllDataList();
        if(dataCases==null)
        {
            return AjaxResult.error("返回结果错误");
        }else {
            return AjaxResult.success(dataCases);
        }
    }
}
